<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>BootStrap-Switch</title>
<link rel="stylesheet" type="text/css" href="css/main.css" />
<link rel="stylesheet" type="text/css" href="css/default.css">
<script type="text/javascript" src="js/jquery-1.5.1.js"></script>
<script type="text/javascript">
	$(function() {

		var a = document.getElementById("status").innerHTML;
		alert(a);
		if (a == '已开启') {
			$("#wrap1")
					.html(
							"<div class='checkbox checkbox-slider--b'><label> <input type='checkbox' checked><span>checked</span></label></div>")
		}

		if (a == '已关闭') {

			$("#wrap1")
					.html(
							"<div class='checkbox checkbox-slider--b'><label> <input type='checkbox'><span>checked</span></label></div>")
		}

	})

	function switchT(status) {

		if (status == 1) {
			$("#wrap")
					.html(
							"<div class='checkbox checkbox-slider--b'><label> <input type='checkbox' checked><span>checked</span></label></div>")
		}

		if (status == 0) {
			$("#wrap")
					.html(
							"<div class='checkbox checkbox-slider--b'><label> <input type='checkbox'><span>checked</span></label></div>")
		}
	}

	function getradio(data) {

		var radioval = $('#wrap input[name="payMethod"]:checked ').val();
		alert(radioval)
		if (radioval == "on") {
			alert(data + '=' + 1)
		}

		if (radioval == null) {
			alert(data + '=' + 0)
		}
	}
</script>
</head>
<body>



	<div id='wrap'><div class='checkbox checkbox-slider--b'><label><input type='checkbox' name='payMethod' onclick='getradio(666)' checked><span></span></label></div></div>

	<%-- <button onclick="switchT(1)">111</button>
	<button onclick="switchT(0)">000</button>


	<div id="status">已关闭</div>
	<div id="wrap5">
		<input type="radio" name="payMethod" value="${equip.id}=1"
			onclick="getradio()" />开启 <input type="radio" name="payMethod"
			value="${equip.id}=0" onclick="getradio()" />关闭
	</div>

	<div id="wrap1"></div> --%>
</body>
</html>